<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<script src='/static/admin/js/common_index.js'></script>
<script src='/static/admin/js/tableList.js'></script>
<style>
    .danbut{border: 1px solid #eee;padding: 0 20px 10px}
    .danbut button{margin-top: 10px;margin-right:10px;background-color: #FFFFFF;color: #777;border: 1px solid #ccc}
    .danbut button:hover{background-color: #2272eb;color: #FFFFFF;border: 1px solid #2272eb}
    .danbut button.active{background-color: #2272eb;color: #FFFFFF;border: 1px solid #2272eb}
    .relss{border: 1px solid #eee;}
    .tabfenge{height: 30px;border-top: 1px solid #eee;border-bottom: 1px solid #eee}
    .layui-laypage-default{float: right}
    .jingchabut{position: absolute;right: 20px;top: 10px;height: 30px;line-height: 25px;background: #2272eb;color: #fff;width: 90px;border-radius: 6px;}
    .jingchabut:hover{background: #FFFFFF;color: #2272eb;}
</style>
<body id="xiangqingPage">
<div id="xiangqingBox" style="padding-top: 10px;padding-bottom: 150px">
    <div style="margin: 10px 0 0 15px">
        <div id="public_enginname" style="-width: 400px;float: left;line-height: 36px;font-weight: bold">
<!--            <div id="enginid" class="xmselect_div">-->
<!--                <div class="xmselect_title">请选择</div>-->
<!--            </div>-->

        </div>
        <div style="float: left;margin-left: 15px">
            <div id="fuzhuanniu"></div>
            <button class="laytp-btn laytp-btn-md laytp-btn-primary" id="jingChaButton"><i class="layui-icon layui-icon-search"></i>选择项目</button>
        </div>
    </div>
    <div style="clear: both"></div>

    <div class="main-container chanei layui-hide">
        <div class="tongbox tongbox4">
            <div class="tuo">
                <div class="tit">合同价(元)</div>
                <div class="con colorlan" id="tong_shimoney"></div>
            </div>
            <div class="tuo">
                <div class="tit">工程结算金额(元)</div>
                <div class="con colorlan" id="tong_shijiemoney"></div>
            </div>
            <div class="tuo">
                <div class="tit">已开具销项发票金额(元)</div>
                <div class="con colorlan" id="tong_piaokaifee"></div>
            </div>
            <div class="tuo">
                <div class="tit">销项发票税额(元)</div>
                <div class="con colorlan" id="tong_piaokairatefee"></div>
            </div>
        </div>
        <div class="tongbox tongbox4">
            <div class="tuo">
                <div class="tit">补充合同金额(元)</div>
                <div class="con colorlan" id="tong_bumoney"></div>
            </div>
            <div class="tuo">
                <div class="tit">累计回款金额(元)</div>
                <div class="con colorlan" id="tong_gonghuimoney"></div>
            </div>
            <div class="tuo">
                <div class="tit">已开票未回款金额(元)</div>
                <div class="con" id="tong_yikaiweihuifee"></div>
            </div>
            <div class="tuo">
                <div class="tit">本工程回款累计支付(元)</div>
                <div class="con colorlan" id="tong_gongzhimoneyquben"></div>
            </div>

        </div>
        <div class="tongbox tongbox4">
            <div class="tuo">
                <div class="tit">本工程回款累计收取(元)</div>
                <div class="con colorlan" id="tong_gonghuikoufee"></div>
            </div>
            <div class="tuo">
                <div class="tit">其中暂扣合计(元)</div>
                <div class="con colorlan" id="tong_qizankoufee"></div>
            </div>
            <div class="tuo">
                <div class="tit">暂扣解冻合计(元)</div>
                <div class="con colorlan" id="tong_jiedongkoufee"></div>
            </div>
            <div class="tuo">
                <div class="tit">本工程回款预留金额(元)</div>
                <div class="con" id="tong_yuliufee"></div>
            </div>

        </div>
        <div class="tongbox tongbox4">
            <div class="tuo">
                <div class="tit">本工程回款可用余额(元)</div>
                <div class="con" id="tong_gonghui_keyu"></div>
            </div>
            <div class="tuo">
                <div class="tit">累计工程付款(元)</div>
                <div class="con colorlan" id="tong_gongzhimoney"></div>
            </div>
            <div class="tuo">
                <div class="tit">工程累计支付销售方(元)</div>
                <div class="con colorlan" id="tong_gongzhimoneygogong"></div>
            </div>
            <div class="tuo">
                <div class="tit">已登记进项发票金额(元)</div>
                <div class="con colorlan" id="tong_piaoshoumoney"></div>
            </div>

        </div>
        <div class="tongbox tongbox4">
            <div class="tuo">
                <div class="tit">进项发票税额(元)</div>
                <div class="con colorlan" id="tong_piaoshouratefee"></div>
            </div>
            <div class="tuo">
                <div class="tit">已抵扣进项发票税额(元)</div>
                <div class="con colorlan" id="tong_hougongshuimoney"></div>
            </div>
            <div class="tuo">
                <div class="tit">未抵扣进项发票税额(元)</div>
                <div class="con" id="tong_nodishuifei"></div>
            </div>
            <div class="tuo">
                <div class="tit">工程采购合同金额(元)</div>
                <div class="con colorlan" id="tong_contractcaimoney"></div>
            </div>
        </div>
        <div class="danbut" id="danbut">
            <button class="layui-btn layui-btn-sm active" key="xiang_engin" type="button">工程承揽</button>
            <button class="layui-btn layui-btn-sm" key="contract_nei" type="button">工程管理文件汇编</button>
            <button class="layui-btn layui-btn-sm" key="contract_shi" type="button">建设工程施工合同</button>
            <button class="layui-btn layui-btn-sm" key="piao_kai" type="button">销项发票</button>
            <button class="layui-btn layui-btn-sm" key="engin_shui" type="button">税款保证金承诺书</button>
            <button class="layui-btn layui-btn-sm" key="hou_gonghui" type="button">工程回款</button>
            <button class="layui-btn layui-btn-sm" key="hou_kou" type="button">工程扣费</button>
            <button class="layui-btn layui-btn-sm" key="hou_gongzhi" type="button">工程付款</button>
            <button class="layui-btn layui-btn-sm" key="contract_cai" type="button">采购合同</button>
            <button class="layui-btn layui-btn-sm" key="piao_shou" type="button">进项发票</button>
            <button class="layui-btn layui-btn-sm" key="hou_gongshui" type="button">进项税额抵扣</button>
            <button class="layui-btn layui-btn-sm" key="doss" type="button">工程档案</button>
            <button class="layui-btn layui-btn-sm" key="kaobao" type="button">工程保险</button>
            <button class="layui-btn layui-btn-sm" key="kaoacc" type="button">工程账户</button>
            <button class="layui-btn layui-btn-sm" key="kaoshi" type="button">工程纠纷</button>
            <button class="layui-btn layui-btn-sm" key="engin_cha" type="button">工程检查</button>

        </div>


        <div class="relss rel_info_xiang_engin">
            <div class="table-box tablenes">
                <div class="title"><span>基本信息</span><span class="bidinfobut colorlan layui-hide" style="float: right;margin-right: 12px">查看工程报备信息</span></div>
                <table class="layui-table">
                    <tbody>
                    <tr><td class="tt">承揽状态</td><td class="tv" id="lantake_name" colspan="3"></td></tr>
                    <tr><td class="tt">工程状态</td><td class="tv" id="state_name" colspan="3"></td></tr>
                    <tr><td class="tt">工程名称</td><td class="tv" id="name"></td><td class="tt">工程编号</td><td class="tv" id="number"></td></tr>
                    <tr><td class="tt">甲方名称</td><td class="tv" id="jiaer"></td><td class="tt">工程负责人</td><td class="tv" id="gofuer"></td></tr>
                    <tr><td class="tt">工程负责人联系电话</td><td class="tv" id="gofutel" colspan="3"></td></tr>
                    <tr><td class="tt">所在地</td><td class="tv" id="areas"></td><td class="tt">详细地址</td><td class="tv" id="addr"></td></tr>
                    <tr><td class="tt">承揽方式</td><td class="tv" id="lanshi_name"></td><td class="tt">业务归属</td><td class="tv" id="gui_unit_name"></td></tr>
                    <tr><td class="tt">招标方式</td><td class="tv" id="zhaotype_name"></td><td class="tt">工程发布平台</td><td class="tv" id="kailei_name"></td></tr>
                    <tr><td class="tt">中标单位</td><td class="tv" id="win_unit_name"></td><td class="tt">中标日期</td><td class="tv" id="windt"></td></tr>
                    <tr><td class="tt">中标价(元)</td><td class="tv" id="winfee"></td><td class="tt">工期(天)</td><td class="tv" id="gongqi"></td></tr>
                    <tr><td class="tt">工程说明</td><td class="tv" id="gongshuo" colspan="3"></td></tr>
                    <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                    </tbody>
                </table>
            </div>
            <div><?php include "../public/upinfo_show.php";?></div>
        </div>

        <div class="relss layui-hide rel_info_contract_nei">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_contract_nei">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../contract_nei/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_contract_nei">
                    <b>工程管理文件汇编</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../contract_nei/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_contract_nei" lay-filter="datalist_contract_nei"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_contract_shi">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_contract_shi">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../contract_shi/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_contract_shi">
                    <b>建设工程施工合同</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../contract_shi/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_contract_shi" lay-filter="datalist_contract_shi"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_contract_shi_jie">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../contract_shi_jie/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_contract_shi_jie">
                    <b>工程结算</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../contract_shi_jie/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_contract_shi_jie" lay-filter="datalist_contract_shi_jie"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_hou_gonghui">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_hou_gonghui">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../hou_gonghui/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_hou_gonghui">
                    <b>工程回款</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../hou_gonghui/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_hou_gonghui" lay-filter="datalist_hou_gonghui"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_piao_kai">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_piao_kai">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../piao_kai/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_piao_kai">
                    <b>销项票开具</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../piao_kai/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_piao_kai" lay-filter="datalist_piao_kai"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_piao_kai_detail">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../piao_kai/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_piao_kai_detail">
                    <b>销项票明细</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../piao_kai/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_piao_kai_detail" lay-filter="datalist_piao_kai_detail"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_engin_shui">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_engin_shui">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../engin_shui/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_engin_shui">
                    <b>税款保证金承诺书</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../engin_shui/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_engin_shui" lay-filter="datalist_engin_shui"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_contract_cai">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_contract_cai">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../contract_cai/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_contract_cai">
                    <b>采购合同</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../contract_cai/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_contract_cai" lay-filter="datalist_contract_cai"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_contract_cai_jie">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../contract_cai_jie/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_contract_cai_jie">
                    <b>采购合同结算</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../contract_cai_jie/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_contract_cai_jie" lay-filter="datalist_contract_cai_jie"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_hou_gongzhi">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_hou_gongzhi">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../hou_gongzhi/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_hou_gongzhi">
                    <b>工程付款</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../hou_gongzhi/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_hou_gongzhi" lay-filter="datalist_hou_gongzhi"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_hou_gongzhi_detail">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../hou_gongzhi/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_hou_gongzhi_detail">
                    <b>付款明细</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../hou_gongzhi/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_hou_gongzhi_detail" lay-filter="datalist_hou_gongzhi_detail"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_hou_kou">
            <div class="table-box tablenes">
                <script type="text/html" id="toolbarDemo_hou_kou_fuwu">
                    <b>扣收服务费明细</b>
                </script>
                <table id="datalist_hou_kou_fuwu" lay-filter="datalist_hou_kou_fuwu"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>

            <div class="table-box tablenes">
                <script type="text/html" id="toolbarDemo_hou_kou_shuifei">
                    <b>扣收税费(含利息)明细</b>
                </script>
                <table id="datalist_hou_kou_shuifei" lay-filter="datalist_hou_kou_shuifei"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>

            <div class="table-box tablenes">
                <script type="text/html" id="toolbarDemo_hou_kou_kuaifei">
                    <b>扣收快递费明细</b>
                </script>
                <table id="datalist_hou_kou_kuaifei" lay-filter="datalist_hou_kou_kuaifei"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>

            <div class="table-box tablenes">
                <script type="text/html" id="toolbarDemo_hou_kou_qifei">
                    <b>直接扣收明细</b>
                </script>
                <table id="datalist_hou_kou_qifei" lay-filter="datalist_hou_kou_qifei"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_piao_shou">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_piao_shou">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../piao_shou/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_piao_shou">
                    <b>进项票登记</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../piao_shou/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_piao_shou" lay-filter="datalist_piao_shou"></table>
            </div>
            <div style="height: 50px;border-bottom: 1px solid #eee"></div>
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_piao_shou_detail">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../piao_shou/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_piao_shou_detail">
                    <b>进项票登记明细</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../piao_shou/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_piao_shou_detail" lay-filter="datalist_piao_shou_detail"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_hou_gongshui">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_hou_gongshui">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../hou_gongshui/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_hou_gongshui">
                    <b>进项抵扣退税</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../hou_gongshui/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_hou_gongshui" lay-filter="datalist_hou_gongshui"></table>
            </div>
        </div>


        <div class="relss layui-hide rel_info_kaobao">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_kaobao">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../kaobao/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_kaobao">
                    <b>工程保险</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../kaobao/add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_kaobao" lay-filter="datalist_kaobao"></table>
            </div>
        </div>
        <div class="relss layui-hide rel_info_kaoacc">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_kaoacc">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../kaoacc/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_kaoacc">
                    <b>工程账户</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../kaoacc/add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_kaoacc" lay-filter="datalist_kaoacc"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_kaoshi">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_kaoshi">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../kaoshi/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_kaoshi">
                    <b>工程检查</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../kaoshi/add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_kaoshi" lay-filter="datalist_kaoshi"></table>
            </div>
        </div>



        <div class="relss layui-hide rel_info_engin_cha">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_engin_cha">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../engin_cha/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_engin_cha">
                    <b>工程检查</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../engin_cha/flow_add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_engin_cha" lay-filter="datalist_engin_cha"></table>
            </div>
        </div>

        <div class="relss layui-hide rel_info_doss">
            <div class="table-box tablenes">
                <script type="text/html" id="dropdown_doss">
                    <div class="tab-list-authbut">
                        <a href="javascript:;" class="bar_opt" onclick="openPage('../doss/show.php?id={{d.id}}')">查看</a>
                    </div>
                </script>
                <script type="text/html" id="toolbarDemo_doss">
                    <b>工程档案库</b>
                    <button class="layui-btn layui-btn-primary outbut jingchabut" onclick="openPageEdit('../doss/add.php?close=1&enginid='+public_enginid)"><i class="layui-icon layui-icon-add-1"></i>新建</button>
                </script>
                <table id="datalist_doss" lay-filter="datalist_doss"></table>
            </div>
        </div>
    </div>
</div>
<script>
    var aaaa;
    var public_limits = [10,30,50,'全部'];
    var public_limit = 10;
    var public_enginid=0;

    
    
    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;


        $("#danbut button").click(function () {
            $(this).addClass('active').siblings().removeClass('active');
            var key = $(this).attr('key');
            var funcname =  'rel_info_'+key;

            $(".relss").addClass('layui-hide');
            $("."+funcname).removeClass('layui-hide');
            eval(funcname+'()');
        });

        $("#jingChaButton").click(function () {
            openPage('choose_engin.php','80%','80%')

            // public_enginid = $("input[name=enginid]").val() || 0;
            // if(!public_enginid){
            //     facade.error("请选择工程信息");return false;
            // }
            // rel_jing_cha_engin();
            //
            // var key = $("#danbut").children('.active').attr('key') || 'xiang_engin';
            // eval('rel_info_'+key+'()');
        });

        $("#fuzhuanniu").click(function () {
            rel_jing_cha_engin();
            var key = $("#danbut").children('.active').attr('key') || 'xiang_engin';
            eval('rel_info_'+key+'()');
        });






        rel_jing_cha_engin();
        function rel_jing_cha_engin (){
            facade.ajax({url: ask_engin_jing_cha, data:{page:1,pagesize:1}}).done(function(res){
                if (res.code === 2000) {
                    var data = res.data.data.data;
                    if(data.length > 0){
                        if(!public_enginid){
                            public_enginid = data[0].id
                            $("#public_enginname").html(data[0].name)
                        }
                        rel_info_xiang_engin();
                        $(".chanei").removeClass('layui-hide');
                    }else{
                        public_enginid = 0;
                        $(".chanei").addClass('layui-hide');
                    }

                    // xmselect_dan('enginid', res.data.data, public_enginid)

                    render_from();
                }
            });
        }
        function rel_info_xiang_engin (){
            facade.ajax({url: ask_engin_xiang, data:{id: public_enginid}}).done(function(res){
                if (res.code === 2000) {
                    var data = res.data.data;

                    //统计信息
                    var shiinfo = res.data.shiinfo
                    if(shiinfo){
                        $("#tong_shimoney").off('click');
                        $("#tong_shimoney").html(parseFormatNum(shiinfo.money)).click(function () {
                            openPage('../contract_shi/show.php?id='+shiinfo.id);
                        });

                        $("#tong_bumoney").off('click');
                        $("#tong_bumoney").text(parseFormatNum(shiinfo.bumoney)).click(function () {
                            openNavPage('补充合同信息','contract_bu/index.php?id='+shiinfo.id);
                        });

                    }else{
                        $("#tong_shimoney").html('');
                    }
                    if(res.data.shijiemoney){
                        $("#tong_shijiemoney").off('click');
                        $("#tong_shijiemoney").text(parseFormatNum(res.data.shijiemoney)).click(function () {
                            openNavPage('施工合同结算信息','contract_shi_jie/index.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_shijiemoney").text('');
                    }

                    if(res.data.piaokaifee){
                        $("#tong_piaokaifee").off('click');
                        $("#tong_piaokaifee").text(parseFormatNum(res.data.piaokaifee)).click(function () {
                            openNavPage('销项票明细信息','piao_kai/detail.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_piaokaifee").text('');
                    }
                    if(res.data.piaokairatefee){
                        $("#tong_piaokairatefee").off('click');
                        $("#tong_piaokairatefee").text(parseFormatNum(res.data.piaokairatefee)).click(function () {
                            openNavPage('销项票明细信息','piao_kai/detail.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_piaokairatefee").text('');
                    }
                    if(res.data.gonghuimoney){
                        $("#tong_gonghuimoney").off('click');
                        $("#tong_gonghuimoney").text(parseFormatNum(res.data.gonghuimoney)).click(function () {
                            openNavPage('工程回款信息','hou_gonghui/index.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_gonghuimoney").text('');
                    }


                    if(res.data.yikaiweihuifee){
                        $("#tong_yikaiweihuifee").text(parseFormatNum(res.data.yikaiweihuifee));
                    }else{
                        $("#tong_yikaiweihuifee").text('');
                    }



                    if(res.data.gongzhimoneyquben){
                        $("#tong_gongzhimoneyquben").off('click');
                        $("#tong_gongzhimoneyquben").text(parseFormatNum(res.data.gongzhimoneyquben)).click(function () {
                            openNavPage('工程支付明细信息','hou_chi_gongzhi/index.php?qu_enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_gongzhimoneyquben").text('');
                    }
                    if(res.data.gonghuikoufee){
                        $("#tong_gonghuikoufee").off('click');
                        $("#tong_gonghuikoufee").text(parseFormatNum(res.data.gonghuikoufee)).click(function () {
                            openNavPage('工程回款信息','hou_gonghui/index.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_gonghuikoufee").text('');
                    }
                    if(res.data.qizankoufee){
                        $("#tong_qizankoufee").off('click');
                        $("#tong_qizankoufee").text(parseFormatNum(res.data.qizankoufee)).click(function () {
                            openNavPage('直接扣收明细信息','hou_chi_kou_qifei/index.php?status=1&enginid='+public_enginid+'&kouxing='+encodeURI('暂扣'));
                        });
                    }else{
                        $("#tong_qizankoufee").text('');
                    }





                    if(res.data.jiedongkoufee){
                        $("#tong_jiedongkoufee").off('click');
                        $("#tong_jiedongkoufee").text(parseFormatNum(res.data.jiedongkoufee)).click(function () {
                            openNavPage('直接收取信息','hou_chi_kou_qifei/index.php?isdong=1&enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_jiedongkoufee").text('');
                    }
                    if(res.data.gonghui_keyu){
                        $("#tong_gonghui_keyu").text(parseFormatNum(res.data.gonghui_keyu));
                    }else{
                        $("#tong_gonghui_keyu").text('');
                    }
                    if(res.data.jiedongkoufee){
                        $("#tong_jiedongkoufee").text(parseFormatNum(res.data.jiedongkoufee));
                    }else{
                        $("#tong_jiedongkoufee").text('');
                    }

                    if(res.data.yuliufee){
                        $("#tong_yuliufee").text(parseFormatNum(res.data.yuliufee));
                    }else{
                        $("#tong_yuliufee").text('');
                    }


                    if(res.data.gongzhimoney){
                        $("#tong_gongzhimoney").off('click');
                        $("#tong_gongzhimoney").text(parseFormatNum(res.data.gongzhimoney)).click(function () {
                            openNavPage('工程付款信息','hou_gongzhi/index.php?enginid='+public_enginid+'&status=1');
                        });
                    }else{
                        $("#tong_gongzhimoney").text('');
                    }
                    if(res.data.gongzhimoneygogong){
                        $("#tong_gongzhimoneygogong").off('click');
                        $("#tong_gongzhimoneygogong").text(parseFormatNum(res.data.gongzhimoneygogong)).click(function () {
                            openNavPage('工程付款信息','hou_gongzhi/detail.php?dealtype=3&enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_gongzhimoneygogong").text('');
                    }
                    if(res.data.piaoshoumoney){
                        $("#tong_piaoshoumoney").off('click');
                        $("#tong_piaoshoumoney").text(parseFormatNum(res.data.piaoshoumoney)).click(function () {
                            openNavPage('进项票信息','piao_shou/index.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_piaoshoumoney").text('');
                    }
                    if(res.data.piaoshouratefee){
                        $("#tong_piaoshouratefee").off('click');
                        $("#tong_piaoshouratefee").text(parseFormatNum(res.data.piaoshouratefee)).click(function () {
                            openNavPage('进项票信息','piao_shou/index.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_piaoshouratefee").text('');
                    }

                    if(res.data.hougongshuimoney){
                        $("#tong_hougongshuimoney").off('click');
                        $("#tong_hougongshuimoney").text(parseFormatNum(res.data.hougongshuimoney)).click(function () {
                            openNavPage('进项抵扣退税信息','hou_gongshui/index.php?enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_hougongshuimoney").text('');
                    }

                    if(res.data.nodishuifei){
                        $("#tong_nodishuifei").text(parseFormatNum(res.data.nodishuifei));
                    }else{
                        $("#tong_nodishuifei").text('');
                    }



                    if(res.data.contractcaimoney){
                        $("#tong_contractcaimoney").off('click');
                        $("#tong_contractcaimoney").text(parseFormatNum(res.data.contractcaimoney)).click(function () {
                            openNavPage('采购合同信息','contract_cai/index.php?sttaus=1&enginid='+public_enginid);
                        });
                    }else{
                        $("#tong_contractcaimoney").text('');
                    }








                    //基本信息
                    $("#lantake_name").html(data.lantake_name);
                    $("#state_name").html(data.state_name);
                    $("#name").text(data.name);
                    $("#number").text(data.number);
                    $("#jiaer").text(data.jiaer);
                    $("#gofuer").text(data.gofuer);
                    $("#gofutel").text(data.gofutel);
                    $("#areas").text(data.areas);
                    $("#addr").text(data.addr);
                    $("#win_unit_name").text(data.win_unit_name);
                    $("#gui_unit_name").text(data.gui_unit_name);
                    $("#lanshi_name").text(data.lanshi_name);
                    $("#kailei_name").text(data.kailei_name);
                    $("#zhaotype_name").text(data.zhaotype_name);
                    $("#windt").text(data.windt);
                    $("#winfee").text(data.winfee);
                    $("#gongqi").text(data.gongqi);
                    $("#gongshuo").text(data.gongshuo);
                    $("#explain").text(data.explain);

                    if(data.bidid > 0){
                        $(".bidinfobut").removeClass('layui-hide');
                        $(".bidinfobut").off('click');
                        $(".bidinfobut").click(function (e) {
                            openPage('../bid/show.php?id='+data.bidid);
                        });
                    }

                    public_upload_show_file('upload_files', res.data.files);
                    render_from();
                }
            });
        }
        function rel_info_contract_nei (){
            var table_contract_nei = table.render({
                elem: "#datalist_contract_nei",url: facade.url(ask_contract_nei_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_contract_nei', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号'}
                    ,get_list_bill_cols_str('contract_nei')
                    ,{field:'name',title:'协议名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../contract_nei/show.php?id='+d.id+'\')">'+d.name+'</span>';
                        }}
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'gofuer', title: '工程负责人'}
                    ,{field: 'gofutel', title: '联系电话'}
                    ,{field: 'state_name', title: '签订状态'}
                    ,{field: 'qiantype_name', title: '签章类型'}
                    ,{ title:'操作', toolbar: '#dropdown_contract_nei',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_contract_shi (){
            var table_contract_shi = table.render({
                elem: "#datalist_contract_shi",url: facade.url(ask_contract_shi_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_contract_shi', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('contract_shi')
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field:'name',title:'合同名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../contract_shi/show.php?id='+d.id+'\')">'+d.name+'</span>';
                        }}
                    ,{field: 'number', title: '合同编号'}
                    ,{field: 'shihetype', title: '合同类型'}
                    ,{field: 'year', title: '合同年份'}
                    ,{field: 'faer', title: '(发包方)甲方'}
                    ,{field: 'chenger_name', title: '承包方(乙方)'}
                    ,{field: 'money', title: '合同价(元)',totalRow: true}
                    ,{field: 'bumoney', title: '补充合同金额(元)',totalRow: true}
                    ,{field: 'jiemoney', title: '结算金额(元)',totalRow: true}
                    ,{field: 'rate', title: '税率(%)'}
                    ,{field: 'startdt', title: '合同开工日期'}
                    ,{field: 'enddt', title: '合同竣工日期'}
                    ,{field: 'state_name', title: '合同状态'}
                    ,{field: 'fauser', title: '甲方联系人'}
                    ,{field: 'myer', title: '我方签订人'}
                    ,{field: 'fatel', title: '甲方联系电话'}
                    ,{field: 'qiandt', title: '签订日期'}
                    ,{field: 'zhirate', title: '质保金比例(%)'}
                    ,{field: 'zhifee', title: '质保金金额(元)'}
                    ,{ title:'操作', toolbar: '#dropdown_contract_shi',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });


            var table_contract_shi_jie = table.render({
                elem: "#datalist_contract_shi_jie",url: facade.url(ask_contract_shi_jie_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_contract_shi_jie', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('contract_shi_jie')
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field:'',title:'合同名称',templet: function(d){
                            if(d.shiinfo){
                                return '<span class="colorlan" onclick="openPage(\'../contract_shi_jie/show.php?id='+d.shiinfo.id+'\')">'+d.shiinfo.name+'</span>';
                            }
                            return '';
                        }}
                    ,{field:'',title:'合同编号',templet: function(d){
                            if(d.shiinfo){
                                return d.shiinfo.number;
                            }
                            return '';
                        }}
                    ,{field:'',title:'合同价(元)',totalRow: true,templet: function(d){
                            if(d.shiinfo){
                                return d.shiinfo.money;
                            }
                            return '';
                        }}
                    ,{field: 'title', title: '结算主题'}
                    ,{field: 'money', title: '结算金额(元)',totalRow: true}
                    ,{field: 'jiedt', title: '结算日期'}
                    ,{field: 'explain', title: '备注'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_contract_shi_jie',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
        }
        function rel_info_hou_gonghui (){
            var table_hou_gonghui = table.render({
                elem: "#datalist_hou_gonghui",url: facade.url(ask_hou_gonghui_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_gonghui', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('hou_gonghui')
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'shougonglei_name', title: '款项类型'}
                    ,{field: 'zhai', title: '款项摘要'}
                    ,{field: 'money', title: '到账金额(元)',totalRow: true}
                    ,{field: 'dt', title: '到账日期'}
                    ,{field: 'incdaotype_name', title: '到账方式'}
                    ,{field: 'accid_name', title: '到账账户'}
                    ,{field: 'explain', title: '备注'}
                    ,{field:'iskou',title:'本次回款是否收取',templet: function(d){
                            if(d.iskou == '是'){
                                return '<span class="colorlv">'+d.iskou+'</span>';
                            }else if(d.iskou == '否'){
                                return '<span class="colorhuang">'+d.iskou+'</span>';
                            }else{
                                return d.iskou;
                            }
                        }}
                    ,{field: 'koufee', title: '本次收取合计(元)',totalRow: true}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_hou_gonghui',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_piao_kai (){
            var table_piao_kai = table.render({
                elem: "#datalist_piao_kai",url: facade.url(ask_piao_kai_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_piao_kai', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('piao_kai')
                    ,{field:'piao_state',title:'开票状态',templet: function(d){
                            if(d.piao_state == '已开票'){
                                return '<span class="colorlv">'+d.piao_state+'</span>';
                            }else if(d.piao_state == '未开票'){
                                return '<span class="colorhong">'+d.piao_state+'</span>';
                            }else{
                                return d.piao_state;
                            }
                        }}
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'money', title: '开票金额(元)',totalRow: true}
                    ,{field:'ishong',title:'是否红冲',templet: function(d){
                            if(d.ishong == '是'){
                                return '<span class="colorlv">'+d.ishong+'</span>';
                            }else if(d.ishong == '否'){
                                return '<span class="colorhuang">'+d.ishong+'</span>';
                            }else{
                                return d.ishong;
                            }
                        }}
                    ,{field: 'qianpiaotype_name', title: '发票类型'}
                    ,{field: 'shuilv_name', title: '税率'}
                    ,{field: 'kaier', title: '开票单位'}
                    ,{field: 'kuantype_name', title: '票款方式'}
                    ,{field: 'shouer', title: '受票单位'}
                    ,{field: 'ratenum', title: '纳税人识别号'}
                    ,{field: 'bankname', title: '开户行'}
                    ,{field: 'banknum', title: '账号'}
                    ,{field: 'unitaddr', title: '地址'}
                    ,{field: 'phone', title: '电话'}
                    ,{field: 'shimoney', title: '已开票金额(元)',totalRow: true}
                    ,{field: 'dt', title: '开票日期'}
                    ,{field: 'baner', title: '经手人'}
                    ,{ title:'操作', toolbar: '#dropdown_piao_kai',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });


            var table_piao_kai_detail = table.render({
                elem: "#datalist_piao_kai_detail",url: facade.url(ask_piao_kai_detail),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_piao_kai_detail', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('piao_kai')
                    ,{field:'sericnum',title:'流程单号',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../piao_kai/show.php?id='+d.id+'\');">'+d.sericnum+'</span>';
                        }}
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'dt', title: '开票日期'}
                    ,{field: 'nums', title: '发票号码'}
                    ,{field:'ishong',title:'是否红冲',templet: function(d){
                            if(d.ishong == '是'){
                                return '<span class="colorlv">'+d.ishong+'</span>';
                            }else if(d.ishong == '否'){
                                return '<span class="colorhuang">'+d.ishong+'</span>';
                            }else{
                                return d.ishong;
                            }
                        }}
                    ,{field: 'shouer', title: '受票单位'}
                    ,{field: 'qianpiaotype_name', title: '发票类型'}
                    ,{field: 'fee', title: '不含税金额(元)',totalRow: true}
                    ,{field: 'rate', title: '税率(%)'}
                    ,{field: 'listratefee', title: '税额(元)',totalRow: true}
                    ,{field: 'listmoney', title: '价税合计(元)',totalRow: true}
                    ,{field: 'statename', title: '回款状态'}
                    ,{field: 'yihuikuan', title: '累计已回款金额(元)',totalRow: true}
                    ,{field: 'daihuikuan', title: '待回款金额(元)',totalRow: true}
                    ,{ title:'操作', toolbar: '#dropdown_piao_kai_detail',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
        }
        function rel_info_engin_shui (){
            var table_engin_shui = table.render({
                elem: "#datalist_engin_shui",url: facade.url(ask_engin_shui_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_engin_shui', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('engin_shui')
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'name', title: '承诺书名称'}
                    ,{field: 'chener', title: '承诺人'}
                    ,{field: 'chentel', title: '联系电话'}
                    ,{field: 'xiaofee', title: '销项票开票金额(元)',totalRow: true}
                    ,{field: 'nidt', title: ' 拟开票日期'}
                    ,{field: 'baofee', title: '税款保证金金额(元)',totalRow: true}
                    ,{field: 'ratexi', title: '周期利率(%)'}
                    ,{field: 'state_name', title: '签订状态'}
                    ,{field: 'qiantype_name', title: '签章类型'}
                    ,{field:'li_kou_state',title:'收取状态',templet: function(d){
                            if(d.li_kou_state == '已收取'){
                                return '<span class="colorlv">'+d.li_kou_state+'</span>';
                            }else if(d.li_kou_state == '未收取'){
                                return '<span class="colorhuang">'+d.li_kou_state+'</span>';
                            }else{
                                return d.li_kou_state;
                            }
                        }}
                    ,{field: 'li_kaidt', title: '开票日期'}
                    ,{field: 'li_jiqi', title: '计息期起'}
                    ,{field: 'li_laidt', title: '来款日期'}
                    ,{field: 'li_jizhi', title: '计息期止'}
                    ,{field: 'li_zhou', title: '计息周数(周)'}
                    ,{field: 'li_fee', title: '应计利息(元)'}
                    ,{ title:'操作', toolbar: '#dropdown_engin_shui',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_contract_cai (){
            var table_contract_cai = table.render({
                elem: "#datalist_contract_cai",url: facade.url(ask_contract_cai_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_contract_cai', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('contract_cai')
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'state_name', title: '合同状态'}
                    ,{field: 'name', title: '合同名称'}
                    ,{field: 'number', title: '合同编号'}
                    ,{field: 'caitype_name', title: '采购类型'}
                    ,{field: 'hetype_name', title: '合同类型'}
                    ,{field: 'qianpiaotype_name', title: '发票类型'}
                    ,{field: 'gonger', title: '销售方(乙方)'}
                    ,{field: 'gongtel', title: '乙方联系电话'}
                    ,{field: 'caier_name', title: ' 购买方(甲方)'}
                    ,{field: 'myer', title: '我方签订人'}
                    ,{field: 'qiandt', title: '签订日期'}
                    ,{field: 'money', title: '合同金额(元)',totalRow: true}
                    ,{field: 'jiemoney', title: '结算金额(元)',totalRow: true}
                    ,{field: 'rate', title: '税率(%)'}
                    ,{ title:'操作', toolbar: '#dropdown_contract_cai',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });


            var table_contract_cai_jie = table.render({
                elem: "#datalist_contract_cai_jie",url: facade.url(ask_contract_cai_jie_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_contract_cai_jie', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('contract_cai_jie')
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field:'cainame',title:'合同名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../contract_cai/show.php?id='+d.caiid+'\')">'+d.cainame+'</span>';
                        }}
                    ,{field: 'caihetype_name', title: '合同类型'}
                    ,{field: 'title', title: '结算主题'}
                    ,{field: 'money', title: '结算金额',totalRow: true}
                    ,{field: 'jiedt', title: '结算日期'}
                    ,{field: 'explain', title: '备注'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_contract_cai_jie',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
        }
        function rel_info_hou_gongzhi (){
            var table_hou_gongzhi = table.render({
                elem: "#datalist_hou_gongzhi",url: facade.url(ask_hou_gongzhi_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_gongzhi', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('hou_gongzhi')
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'zhai', title: '款项摘要'}
                    ,{field: 'money', title: '本次付款合计(元)',totalRow: true}
                    ,{field: 'explain', title: '备注'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_hou_gongzhi',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });


            var table_hou_gongzhi_detail = table.render({
                elem: "#datalist_hou_gongzhi_detail",url: facade.url(ask_hou_gongzhi_detail),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_gongzhi_detail', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('hou_gongzhi')
                    ,{field:'sericnum',title:'流程单号',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../hou_gongzhi/show.php?id='+d.id+'\');">'+d.sericnum+'</span>';
                        }}
                    ,{field: 'fuer', title: '付款对象'}
                    ,{field:'isfan',title:'是否返款',templet: function(d){
                            if(d.isfan == '是'){
                                return '<span class="colorlv">'+d.isfan+'</span>';
                            }else if(d.isfan == '否'){
                                return '<span class="colorhuang">'+d.isfan+'</span>';
                            }else{
                                return d.isfan;
                            }
                        }}
                    ,{field: 'fanshuo', title: '返款说明'}
                    ,{field:'cainame',title:'本次支付关联采购合同',templet: function(d){
                            if(d.caiid > 0){
                                return '<span class="colorlan" onclick="openPage(\'../contract_cai/show.php?id='+d.caiid+'\')">'+d.cainame+'</span>';
                            }else{
                                return '';
                            }
                        }}
                    ,{field: 'moneyshuo', title: '资金渠道及金额'}
                    ,{field: 'incdaotype_name', title: '支付方式'}
                    ,{field: 'banknum', title: '账户账号'}
                    ,{field: 'bankname', title: '开户行'}
                    ,{field: 'zhikuanlei_name', title: '款项类型'}
                    ,{field: 'listmoney', title: '本次付款金额(元)A',totalRow: true}
                    ,{field: 'listexplain', title: '款项说明'}
                    ,{field:'statename',title:'票据状态',templet: function(d){
                            if(d.statename == '已收票'){
                                return '<span class="colorlv">'+d.statename+'</span>';
                            }else if(d.statename == '部分收票'){
                                return '<span class="colorhuang">'+d.statename+'</span>';
                            }else if(d.statename == '未收票'){
                                return '<span class="colorhong">'+d.statename+'</span>';
                            }else{
                                return d.statename;
                            }
                        }}
                    ,{field: 'yifufee', title: '累计已收票金额(元)B',totalRow: true}
                    ,{field: 'daifufee', title: '待收票金额(元)A-B',totalRow: true}
                    ,{field: 'difee', title: '本次关联进项票金额(元)',totalRow: true}
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'enginnumber', title: '工程编号'}
                    ,{field: 'gofuer', title: '工程负责人'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请日期'}
                    ,{ title:'操作', toolbar: '#dropdown_hou_gongzhi_detail',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
        }
        function rel_info_hou_kou (){
            var table_hou_kou_fuwu = table.render({
                elem: "#datalist_hou_kou_fuwu",url: facade.url(ask_hou_chi_kou_fuwu_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_kou_fuwu', page: true,limits:[5,20,50,'全部']
                ,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,{field: 'shulai', title: '数据来源'}
                    ,{field: 'sericnum', title: '流程单号'}
                    ,{field:'status',title:'审核状态',width:120,templet: function(d){
                            if(d.billid > 0){
                                if(d.status == 0){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }

                                }else if(d.status == 1){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }
                                }else{
                                    return '';
                                }
                            }
                            return '';
                        }}
                    ,{field: 'enginname', title: '费用所属工程名称'}
                    ,{field: 'houkoulei_name', title: '款项类型'}
                    ,{field: 'qu_name', title: '资金渠道'}
                    ,{field:'koufee',title:'当前渠道收取金额(元)',totalRow: true,templet: function(d){
                            return parseFormatNum(d.koufee);
                        }}
                    ,{field: 'dt', title: '到账日期'}
                    ,{field: 'gofuer', title: '工程负责人'}
                    ,{field: 'gui_unit_name', title: '业务归属'}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
            var table_hou_kou_shuifei = table.render({
                elem: "#datalist_hou_kou_shuifei",url: facade.url(ask_hou_chi_kou_shuifei_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_kou_shuifei', page: true,limits:[5,20,50,'全部']
                ,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,{field: 'shulai', title: '数据来源'}
                    ,{field: 'sericnum', title: '流程单号'}
                    ,{field:'status',title:'审核状态',width:120,templet: function(d){
                            if(d.billid > 0){
                                if(d.status == 0){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }

                                }else if(d.status == 1){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }
                                }else{
                                    return '';
                                }
                            }
                            return '';
                        }}
                    ,{field: 'enginname', title: '费用所属工程名称'}
                    ,{field: 'houkoulei_name', title: '款项类型'}
                    ,{field: 'qu_name', title: '资金渠道'}
                    ,{field:'koufee',title:'当前渠道收取金额(元)',totalRow: true,templet: function(d){
                            return parseFormatNum(d.koufee);
                        }}
                    ,{field: 'dt', title: '到账日期'}
                    ,{field: 'gofuer', title: '工程负责人'}
                    ,{field: 'gui_unit_name', title: '业务归属'}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
            var table_hou_kou_kuaifei = table.render({
                elem: "#datalist_hou_kou_kuaifei",url: facade.url(ask_hou_chi_kou_kuaifei_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_kou_kuaifei', page: true,limits:[5,20,50,'全部']
                ,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,{field: 'shulai', title: '数据来源'}
                    ,{field: 'sericnum', title: '流程单号'}
                    ,{field:'status',title:'审核状态',width:120,templet: function(d){
                            if(d.billid > 0){
                                if(d.status == 0){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }

                                }else if(d.status == 1){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }
                                }else{
                                    return '';
                                }
                            }
                            return '';
                        }}
                    ,{field: 'enginname', title: '费用所属工程名称'}
                    ,{field: 'houkoulei_name', title: '款项类型'}
                    ,{field: 'qu_name', title: '资金渠道'}
                    ,{field:'koufee',title:'当前渠道收取金额(元)',totalRow: true,templet: function(d){
                            return parseFormatNum(d.koufee);
                        }}
                    ,{field: 'dt', title: '到账日期'}
                    ,{field: 'gofuer', title: '工程负责人'}
                    ,{field: 'gui_unit_name', title: '业务归属'}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
            var table_hou_kou_qifei = table.render({
                elem: "#datalist_hou_kou_qifei",url: facade.url(ask_hou_chi_kou_qifei_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_kou_qifei', page: true,limits:[5,20,50,'全部']
                ,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,{field: 'shulai', title: '数据来源'}
                    ,{field: 'sericnum', title: '流程单号'}
                    ,{field:'status',title:'审核状态',width:120,templet: function(d){
                            if(d.billid > 0){
                                if(d.status == 0){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlan" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批中</span></div>'
                                    }

                                }else if(d.status == 1){
                                    if(d.type == 1){
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gonghui/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }else{
                                        return '<div style="text-align: center"><span class="list_billid billstrlv" onclick="openPage(\'../hou_gongyu/show.php?id='+d.zhuid+'\');">审批通过</span></div>'
                                    }
                                }else{
                                    return '';
                                }
                            }
                            return '';
                        }}
                    ,{field: 'enginname', title: '费用所属工程名称'}
                    ,{field: 'houkoulei_name', title: '款项类型'}
                    ,{field: 'qu_name', title: '资金渠道'}
                    ,{field:'koufee',title:'当前渠道收取金额(元)',totalRow: true,templet: function(d){
                            return parseFormatNum(d.koufee);
                        }}
                    ,{field: 'dt', title: '到账日期'}
                    ,{field: 'kouxing', title: '收取性质'}
                    ,{field: 'isdong_name', title: '资金状态'}
                    ,{field: 'dongshuo', title: '解冻说明'}
                    ,{field: 'dongdt', title: '解冻日期'}
                    ,{field: 'donger', title: '解冻操作人'}
                    ,{field: 'gofuer', title: '工程负责人'}
                    ,{field: 'gui_unit_name', title: '业务归属'}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });


        }
        function rel_info_piao_shou (){
            var table_piao_shou = table.render({
                elem: "#datalist_piao_shou",url: facade.url(ask_piao_shou_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_piao_shou', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('piao_shou')
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'enginnumber', title: '工程编号'}
                    ,{field: 'money', title: '本次进项票金额(元)',totalRow: true}
                    ,{field: 'ratefee', title: '本次进项票税额(元)',totalRow: true}
                    ,{field: 'explain', title: '备注'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_piao_shou',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });


            var table_piao_shou_detail = table.render({
                elem: "#datalist_piao_shou_detail",url: facade.url(ask_piao_shou_detail),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_piao_shou_detail', page: true,limits:[5,20,50,'全部']
                ,limit:5,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('piao_shou')
                    ,{field:'sericnum',title:'流程单号',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../piao_shou/show.php?id='+d.id+'\');">'+d.sericnum+'</span>';
                        }}
                    ,{field: 'nums', title: '发票号码'}
                    ,{field: 'usedt', title: '使用月份'}
                    ,{field: 'xiaoer', title: '销售方名称'}
                    ,{field: 'qianpiaotype_name', title: '发票类型'}
                    ,{field:'cainame',title:'本次关联采购合同工名称',templet: function(d){
                            if(d.caiid > 0){
                                return '<span class="colorlan" onclick="openPage(\'../contract_cai/show.php?id='+d.caiid+'\');">'+d.cainame+'</span>';
                            }else{
                                return '';
                            }
                        }}
                    ,{field: 'kaidt', title: '开票日期'}
                    ,{field: 'fee', title: '不含税金额(元)',totalRow: true}
                    ,{field: 'rate', title: '税率(%)'}
                    ,{field: 'listratefee', title: '税额(元)',totalRow: true}
                    ,{field: 'listmoney', title: '价税合计(元)',totalRow: true}
                    ,{field: 'huidt', title: '回票日期'}
                    ,{field: 'zhikuanlei_name', title: '发票分类'}
                    ,{field: 'difee', title: '本次收票对应付款金额(元)',totalRow: true}
                    ,{field:'statename',title:'付款状态',templet: function(d){
                            if(d.statename == '已付款'){
                                return '<span class="colorlv">'+d.statename+'</span>';
                            }else if(d.statename == '部分付款'){
                                return '<span class="colorhuang">'+d.statename+'</span>';
                            }else if(d.statename == '未付款'){
                                return '<span class="colorhong">'+d.statename+'</span>';
                            }else{
                                return d.statename;
                            }
                        }}
                    ,{field: 'yifufee', title: '累计已付款金额(元)',totalRow: true}
                    ,{field: 'daifufee', title: '待付款金额(元)',totalRow: true}
                    ,{field:'tuishui',title:'退税状态',templet: function(d){
                            if(d.tuishui == '已退税'){
                                return '<span class="colorlv">'+d.tuishui+'</span>';
                            }else if(d.tuishui == '未退税'){
                                return '<span class="colorhuang">'+d.tuishui+'</span>';
                            }else{
                                return d.tuishui;
                            }
                        }}
                    ,{field: 'enginname', title: '工程名称'}
                    ,{ title:'操作', toolbar: '#dropdown_piao_shou_detail',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
        }
        function rel_info_hou_gongshui (){
            var table_hou_gongshui = table.render({
                elem: "#datalist_hou_gongshui",url: facade.url(ask_hou_gongshui_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_hou_gongshui', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('hou_gongshui')
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'money', title: '本次进项抵扣退税(元)',totalRow: true}
                    ,{field: 'rendt', title: '认证日期'}
                    ,{field: 'tuifang_name', title: '退税方式'}
                    ,{field: 'fuer', title: '付款对象'}
                    ,{field: 'incdaotype_name', title: '支付方式'}
                    ,{field: 'banknum', title: '账户账号'}
                    ,{field: 'bankname', title: '开户行'}
                    ,{field: 'zhiqilei_name', title: '款项类型'}
                    ,{field: 'explain', title: '备注'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_hou_gongshui',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_engin_cha (){
            var table_engin_cha = table.render({
                elem: "#datalist_engin_cha",url: facade.url(ask_engin_cha_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_engin_cha', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,get_list_bill_cols_str('engin_cha')
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'chatype_name', title: '检查类型'}
                    ,{field: 'chaer', title: '检查人'}
                    ,{field: 'chadt', title: '检查日期'}
                    ,{field:'isxu',title:'是否需整改',templet: function(d){
                            if(d.isxu == '否'){
                                return '<span class="colorlv">'+d.isxu+'</span></div>'
                            }else if(d.isxu == '是'){
                                return '<span class="colorcheng">'+d.isxu+'</span></div>'
                            }else{
                                return '';
                            }
                        }}
                    ,{field: 'gaier', title: '整改负责人'}
                    ,{field:'',title:'要求完成日期',templet: function(d){
                            if(d.yaohong){
                                return '<span class="colorhong">'+d.yaodt+'</span></div>'
                            }else{
                                return d.yaodt;
                            }
                        }}
                    ,{field:'iszheng',title:'是否已整改',templet: function(d){
                            if(d.iszheng == '否'){
                                return '<span class="colorhong">'+d.iszheng+'</span></div>'
                            }else if(d.iszheng == '是'){
                                return '<span class="colorlv">'+d.iszheng+'</span></div>'
                            }else{
                                return '';
                            }
                        }}
                    ,{field: 'zhengdt', title: '整改完成日期'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_engin_cha',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_kaobao (){
            var table_kaobao = table.render({
                elem: "#datalist_kaobao",url: facade.url(ask_kaobao_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_kaobao', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'gui_unit_name', title: '业务归属'}
                    ,{field: 'gofuer', title: '工程负责人'}
                    ,{field: 'gofutel', title: '联系电话'}
                    ,{field:'shimoney',title:'合同价(元)',templet: function(d){return parseFormatNum(d.shimoney);}}
                    ,{field: 'gongqi', title: '工期'}
                    ,{field: 'isbao', title: '是否投保'}
                    ,{field: 'shuo', title: '工程保险说明'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请时间'}
                    ,{ title:'操作', toolbar: '#dropdown_kaobao',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_kaoacc (){
            var table_kaoacc = table.render({
                elem: "#datalist_kaoacc",url: facade.url(ask_kaoacc_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_kaoacc', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'nongkai', title: '农民工工资专户是否开设'}
                    ,{field: 'nongqi', title: '农民工工资专户是否启用'}
                    ,{field: 'jiankai', title: '监管账户是否开设'}
                    ,{field: 'jianqi', title: '监管账户是否启用'}
                    ,{field: 'explain', title: '备注'}
                    ,{ title:'操作', toolbar: '#dropdown_kaoacc',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_kaoshi (){
            var table_kaoshi = table.render({
                elem: "#datalist_kaoshi",url: facade.url(ask_kaoshi_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_kaoshi', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计'}
                    ,{field:'enginname',title:'工程名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'name', title: '纠纷名称'}
                    ,{field: 'duier', title: '投诉人'}
                    ,{field: 'duitel', title: '联系电话'}
                    ,{field:'shefee',title:'涉及金额(元)',totalRow: true,templet: function(d){
                            return parseFormatNum(d.shefee);
                        }}
                    ,{field: 'explain', title: '纠纷内容'}
                    ,{ title:'操作', toolbar: '#dropdown_kaoshi',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
        function rel_info_doss (){
            var table_doss = table.render({
                elem: "#datalist_doss",url: facade.url(ask_doss_list),where: {enginid:public_enginid}
                , toolbar: '#toolbarDemo_doss', page: true,limits:public_limits
                ,limit:public_limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text,totalRow: true
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号'}
                    ,{field: 'enginname', title: '工程名称'}
                    ,{field: 'number', title: '档案编号'}
                    ,{field: 'dossfen_name', title: '档案分类'}
                    ,{field: 'name', title: '档案名称'}
                    ,{field: 'dangdt', title: '档案日期'}
                    ,{field: 'xianger', title: '相关方'}
                    ,{field: 'shefee', title: '涉及金额'}
                    ,{field: 'danglei', title: '档案类型'}
                    ,{field: 'yeshu', title: '页码数'}
                    ,{field: 'runum', title: '入库份数'}
                    ,{field: 'guinum', title: '归档份数'}
                    ,{field: 'guidt', title: '归档日期'}
                    ,{field: 'guier', title: '归档人'}
                    ,{field: 'explain', title: '备注'}
                    ,{ title:'操作', toolbar: '#dropdown_doss',align:'center',width:100}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });

        }
    });










</script>
</body>
</html>




